<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
*/

$sql='SELECT menuID, menuNAME FROM SiteMenu WHERE menuSITE=' . $hisite . ' ORDER BY menuINDEX';
$result=mysql_query($sql);

while($row=mysql_fetch_array($result)) {
    $id = $row['menuID'];
    $thing = $row['menuNAME'];
    $options.="<OPTION VALUE=\"$id\">" . $thing;
}
echo '
<div id="content">
<h5 class="info-title">Tag Manager</h5>
<h2>Create a new tag</h2>
<p>To create a new tag, type the new tag name and select an available menu.</p>


<form action="plugin/base/cms/tags/newtag.php" method="post">
<table border="0">
<tr>
    <td>Menu:</td>
    <td><select name="mID">
<OPTION VALUE=0>Select Menu...',$options,'</select>
    </td>
  </tr>

<tr>
    <td>Name:</td>
    <td>
      <input type = "text" name="newtag" size="74">
    </td>
 </tr>
 <tr>
    <td><input type="hidden" name="site"  width="0" value=', $hisite  ,'></td>
    <td>
      <input type="submit" value="Create" name="newform">
    </td>
 </tr>
 </table>
</form>
<a href="#top">Top ^</a>
<h2>Tag Editor</h2>',
'<p>To edit a tag, first select the menu.
    Then select the tag to edit. </p>';

echo'
<form><select name="menuID" onchange="showSubBox(this.value)">
<OPTION VALUE=0>Select Menu...',$options,'</select>
</form><br />
<div id="txtTagBox"><b>
</b></div>
<a href="#top">Top ^</a>

<h2>Tag Layout</h2>
<p>Edit menu by first selecting the menu and then rearrange tags.
Press button to save changes.</p>';

echo'
<form><select name="menuID" onchange="showDrag(this.value)">
<OPTION VALUE=0>Select Menu...',$options,'</select>

<pre>
<div id="info">Waiting for update</div>
</pre>
<ul id="test-list">',

 '</ul></form><div><a href="#top">Top ^</a>';

echo "
</div>
</div><!-- end of inside -->
";
?>

